package starter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import controller.Admin;

import businnes.Client;

import dao.ClientDAO;
import dao.ClientDAOJPA;

public class Start {

//	//@Autowired
//	private static ClientDAO clientDAO;
	public static void main(String[] args) {
	    ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
	    //Dao<User> uhd = (Dao) context.getBean("userDao");
	    //User user = new User();
	    //user.setNickName("UserName");
	    //uhd.saveOrUpdate(user);
//	    clientDAO = new ClientDAOJPA();
	    Client client = new Client();
	    Admin admin = new Admin();
//	    admin.setClientDAO(clientDAO);
	    admin.addClient(client);
	    
	    
	}
//	public static void setClientDAO(ClientDAO clientDAO) {
//		Start.clientDAO = clientDAO;
//	}
	
}
